const personName = "Wukong"
const sex = "male"

const personInfo = {
    name:"xiaoming",
    age:18
}

const person = {
    [personInfo.name]:sex,
    [personInfo.age](){
        console.log(`my name is ${this.person?.name}`);
    }
}

console.log(person)